import { ActionDesc, PagesKey } from '@/global/constant'
import { IContentConfig, TableItemType } from '@/components/page-content/type'

const userListContent: IContentConfig = {
  pageKey: PagesKey.UserList,
  tableConfig: {
    // bordered: true
    size: 'small',
    rowKey: 'userId'
  },
  isShowRowSelection: true,
  isShowMoreAction: true,
  moreActions: [
    { key: ActionDesc.Edit, label: '修改' },
    { key: ActionDesc.Delete, label: '删除' },
    { key: ActionDesc.UserAssignRole, label: '分配角色' },
    { key: ActionDesc.UserResetPwd, label: '重置密码' },
    { key: ActionDesc.UserKickOut, label: '强制下线' }
  ],
  isShowAddBtn: true,
  isShowBatchBtn: true,
  batchActions: [
    { key: ActionDesc.UserBatchBanned, label: '批量封禁' },
    { key: ActionDesc.UserBatchUniteDisable, label: '批量解封' },
    { key: ActionDesc.BatchDelete, label: '批量删除' }
  ],
  tableItems: [
    {
      type: TableItemType.Column,
      title: '基本信息',
      dataIndex: 'baseInfo',
      customkey: 'baseInfo',
      width: 350
    },
    {
      type: TableItemType.Column,
      title: '角色',
      dataIndex: 'roleName',
      customkey: 'roleName',
      width: 150
    },
    {
      type: TableItemType.Column,
      title: '状态',
      dataIndex: 'status',
      customkey: 'status'
    },
    {
      type: TableItemType.Column,
      title: '身份',
      dataIndex: 'userType',
      customkey: 'userType'
    },
    {
      type: TableItemType.Column,
      title: '创建时间',
      dataIndex: 'createTime'
    }
  ]
}

export default userListContent
